﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AutoParkingManagement
{
    public abstract class Factory<T>
    {
        public static T CreateInstance()
        {
            if (typeof(T) == typeof(IBLLCardType))
            {
                IBLLCardType obj = new BLLCardType();
                return (T)obj;
            }
            else if (typeof(T) == typeof(IDALCardType))
            {
                IDALCardType obj = new DALCardType();
                return (T)obj;
            }
            return default(T);
        }
    }
}
